package kr.co.doriclassic.pro12;

import java.util.Random;

public class TestMove {
	public static void main(String[] args) {
		Movable[] m = new Movable[3];
		m[0]=new Circle();
		m[1]=new Tri();
		m[2]=new Sqare();
		
		for(int i=0;i<m.length;i++){
			Random rnd = new Random();
			m[i].move(rnd.nextInt(100)+1, rnd.nextInt(100)+1);
			System.out.println();
		}
		
		Drawable d = null;
		Random rnd2=new Random();
		switch(rnd2.nextInt(3)+1){
			case 1:
				d = new Circle();
				break;
			case 2:
				d = new Tri();
				break;
			case 3:
				d = new Sqare();
				break;
			default:
				System.out.println("오류입니다.");
				break;
		}
		d.draw();		
		
	}
}
